package com.qijia.travel.dao;

import java.util.List;

import com.ibatis.sqlmap.client.SqlMapClient;
import com.qijia.travel.domain.PageResult;

public interface BaseDAO {
	public SqlMapClient getSqlMapClient() throws TravelDbException;
	
	public int getAutoIncrementId(String tableName)throws TravelDbException;

	void insert(String SqlMapId, Object record) throws TravelDbException;

	int updateByPrimaryKey(String SqlMapId, Object record)
			throws TravelDbException;

	int updateByPrimaryKeySelective(String SqlMapId, Object record)
			throws TravelDbException;

	public PageResult selectByPage(PageResult page) throws TravelDbException;

	List<?> selectByExample(String SqlMapId, Object example)
			throws TravelDbException;

	Object selectByPrimaryKey(String SqlMapId, Object keyId)
			throws TravelDbException;

	int deleteByExample(String SqlMapId, Object example)
			throws TravelDbException;

	int deleteByPrimaryKey(String SqlMapId, Object keyId)
			throws TravelDbException;

	int countByExample(String SqlMapId, Object example)
			throws TravelDbException;
}
